package ru.sstu.bulls_and_cows.core;

import java.util.ArrayList;
import java.util.List;
import java.util.Observable;

/**
 * <code>GameField</code> class represents field for Renju game.
 *
 * @author denis_murashev
 * @since Renju 1.0
 */
public class Game extends Observable implements Runnable {

	/**
	 * Game field size.
	 */
	public static final int SIZE = 15;

	private final Player[] players = new Player[2];
	private List<Attempt> history = new ArrayList<Attempt>(SIZE * SIZE);

	/**
	 * Initializes game.
	 *
	 * @param blackPlayer black player engine
	 * @param whitePlayer white player engine
	 */
	public Game(Player blackPlayer, Player whitePlayer) {
		players[0] = blackPlayer;
		players[1] = whitePlayer;
	}

	/**
	 * @return the history
	 */
	public List<Attempt> getHistory() {
		return history;
	}

	@Override
	public void run() {
		while (true) {
			setChanged();
			notifyObservers();
		}
	}
}
